import datetime
import json


def load_data(file_path):
    with open(file_path, 'r') as f:
        data = json.load(f)
    return data


if __name__ == '__main__':
    data = load_data('detail.json')
    result = data.get('result')
    activity_extension_audit_list = result.get('activity_extension_audit_list')
    audit_list = result.get('audit_list')
    goods_id = result.get('goods_id')

    for item in activity_extension_audit_list:
        audit_status = item.get('audit_status')
        need_show_merchant_submit_price_button = item.get('need_show_merchant_submit_price_button')
        update_time = item.get('update_time')

        if audit_status == 1 and need_show_merchant_submit_price_button is True:
            print('需要抓取','goods_id = ',goods_id,'update_time = ',update_time,need_show_merchant_submit_price_button)
    for item in audit_list:
        status = item.get('status')
        created_at = item.get('created_at')
        need_show_merchant_submit_price_button = item.get('need_show_merchant_submit_price_button')
        if (audit_status == 501 or audit_status == 702) and need_show_merchant_submit_price_button == True:
            print('需要抓取 audit_list',goods_id,created_at,need_show_merchant_submit_price_button)
